% f0825();
% x = [0 : pi/100 : 2*pi];
% y = 2* exp(-0.5*x).*sin(2*pi*x);
% plot(x,y,"r*");
% str = "时刻t(h) " + ...
%     "";
% dlmwrite;

% t = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, ...
%     17, 18, 19, 20, 21, 22, 23, 24];
% temperature = [15, 14, 14, 14, 14, 15, 16, 18, 20, 22, 23, 25, ...
%     28, 31, 32, 31, 29, 27, 25, 24, 22, 20, 18, 17, 16];
% 
% plot(t,temperature,"-o");
% 
% xlabel('时间/小时');
% ylabel("温度/摄氏度");
% title("一天的温度变化");
% % 
% grid on;
% 定义时刻和温度数据
% t = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24];
% temperature = [15, 14, 14, 14, 14, 15, 16, 18, 20, 22, 23, 25, 28, 31, 32, 31, 29, 27, 25, 24, 22, 20, 18, 17, 16];
% 
% % 绘制折线图
% plot(t, temperature, '-o');
% 
% xlabel('123456');
% grid on;

% x = 0:0.1:2*pi;
% y = sin(x);
% plot(x, y);
% xlabel('角度（弧度）','outer');  % 设置x轴标签
% ylabel('sin(x)的值');  % 设置y轴标签
% title('正弦函数图');  % 设置图表标题



% t = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, ...
%     17, 18, 19, 20, 21, 22, 23, 24];
% temperature = [15, 14, 14, 14, 14, 15, 16, 18, 20, 22, 23, 25, ...
%     28, 31, 32, 31, 29, 27, 25, 24, 22, 20, 18, 17, 16];
% dlmwrite('test.txt',t, 'delimiter', ' ');
% dlmwrite('test.txt',temperature,'-append', 'delimiter', ' ');


% y = x2 sin (x2 - x- 2), -2 ≤ x ≤ 2  (崧求分崥使用plot或fplot完成)
% x = [-2:0.1:2];
% y = x.*x.*sin( x.*x - x - 2);
% plot(x,y,"*b"); 
% pause;
% 
% fplot(@(x)x.^2 .*sin(x.^2 - x - 2),[-2,2]);
% x2/4 + y2/9= 1

% t = [0:0.01:2*pi];
% x = 2*cos(t);
% y = 3*(sin(t));
% plot(x,y,"*b");


% t = [0:0.01:2*pi];
% x = sin(t);
% y = cos(t);
% z = cos(2*t);
% plot3(x,y,z,"*b");
% t1 = [0:0.01:2*pi];
% t2 = [0:0.01:pi/2];
% 
% x = zeros(length(t1),length(t2));
% y = zeros(length(t1),length(t2));
% z = zeros(length(t1),length(t2));
% 
% for i = [1:length(t1)]
%     for j = [1:length(t2)]
%        x(i,j) = 2*sin(t2(j))*cos(t1(i));
%        y(i,j) = 2*sin(t2(j))*sin(t1(i));
%        z(i,j) = 2*cos(t2(j));
%     end
% end
% plot3(x,y,z,"*b");




x = 0:0.01:pi;
y = zeros(length(x),3);

for i = [1:length(x)]
    y(i,1) = sin(x(i));
    y(i,2) = sin(x(i)).*sin(10*x(i));
    y(i,3) = -sin(x(i));
end


plot(x,y,"*b");
















